package cn.webrx;

public class Reg5 {
    public static void main(String[] args) {
        String a = "java8php-3javascript6mysql--8html5";
        System.out.println(a);
        System.out.println(a.replaceAll("\\d+", "-"));//贪婪
        System.out.println(a.replaceAll("\\d", "-"));
        System.out.println(a.replaceAll("\\d{2,}?", "-"));//?禁用贪婪
    }
}
